﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using University.Workshop.Presenters.Person.Read;

namespace University.Workshop.Presentation.Person
{
    /// <summary>
    /// Interaction logic for ReadPerson.xaml
    /// </summary>
    public partial class ReadPerson : Page, IReadPersonView
    {
        PresenterReadPerson pReadPerson;
        public ReadPerson(Model.Person person)
        {
            InitializeComponent();
            pReadPerson = new PresenterReadPerson(this, person);
        }

        private void Page_Loaded(object sender, RoutedEventArgs e)
        {
            pReadPerson.FillViewData();
            App.Current.MainWindow.Title = "Ver Persona";
        }

        public string PersonId
        {
            get
            {
                return CiLbl.Content.ToString();
            }
            set
            {
                CiLbl.Content = value;
            }
        }

        public string PersonNames
        {
            get
            {
                return NamesLbl.Content.ToString();
            }
            set
            {
                NamesLbl.Content = value;
            }
        }

        public string PersonLastNames
        {
            get
            {
                return LastNamesLbl.Content.ToString();
            }
            set
            {
                LastNamesLbl.Content = value;
            }
        }

        public List<string> PersonPhones
        {
            set 
            {
                PhoneLst.ItemsSource = value;
            }
        }

        private void CancelBtn_Click(object sender, RoutedEventArgs e)
        {
            this.NavigationService.Navigate(new SearchPerson());
        }


    }
}
